﻿@model ShoppingCartSettingsModel


<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header"></div>
                <div class="layui-card-body">
                    <div class="layui-form" wid200 lay-filter="">

                        <div class="layui-form-item">
                            <u-label asp-for="MaximumShoppingCartItems" />
                            <div class="layui-input-inline">
                                <u-editor asp-for="MaximumShoppingCartItems" />
                            </div>
                        </div>
                        <div class="layui-form-item" style="display:none;">
                            <u-label asp-for="MaximumWishlistItems" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="MaximumWishlistItems" />
                            </div>
                        </div>
                        <div class="layui-form-item" style="display:none;">
                            <u-label asp-for="MoveItemsFromWishlistToCart" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="MoveItemsFromWishlistToCart" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="ShowGoodsImagesOnShoppingCart" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="ShowGoodsImagesOnShoppingCart" />
                            </div>
                        </div>
                        <div class="layui-form-item" style="display:none;">
                            <u-label asp-for="ShowGoodsImagesOnWishList" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="ShowGoodsImagesOnWishList" />
                            </div>
                        </div>
                        <div class="layui-form-item" style="display:none;">
                            <u-label asp-for="CrossSellsNumber" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="CrossSellsNumber" />
                            </div>
                        </div>
                        <div class="layui-form-item" style="display:none;">
                            <u-label asp-for="EmailWishlistEnabled" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="EmailWishlistEnabled" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="AllowAnonymousUsersToEmailWishlist" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="AllowAnonymousUsersToEmailWishlist" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="MiniShoppingCartEnabled" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="MiniShoppingCartEnabled" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="MiniShoppingCartGoodsNumber" />
                            <div class="layui-input-inline">
                                <u-editor asp-for="MiniShoppingCartGoodsNumber" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="ShowGoodsImagesInMiniShoppingCart" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="ShowGoodsImagesInMiniShoppingCart" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="MinimunShoppingCartItemGoodsQuantity" />
                            <div class="layui-input-inline">
                                <u-editor asp-for="MinimunShoppingCartItemGoodsQuantity" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="set_system_submit_btn">确认保存</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use(['index'], function () {
        var $ = layui.$
            , form = layui.form
            ,active = { }
        form.on('submit(set_system_submit_btn)', function (obj) {
          var field = obj.field;
            $.post('@Url.Action("ShoppingCart")', field, function (rep) {
                if (rep.success == 1) {
                    layer.msg('保存成功');
                }
            });
            return false;
    });
        $('.layui-btn.layuiadmin-btn-tags').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });
</script>